<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- \section[Hooks]{Low level API hooks}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- NB: this module is SOURCE-imported by DynFlags, and should primarily</span><span>
</span><span id="line-4"></span><span class="hs-comment">--     refer to *types*, rather than *code*</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE CPP, RankNTypes #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Driver.Hooks</span><span>
</span><span id="line-9"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier">Hooks</span></a></span><span>
</span><span id="line-10"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#emptyHooks"><span class="hs-identifier">emptyHooks</span></a></span><span>
</span><span id="line-11"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#lookupHook"><span class="hs-identifier">lookupHook</span></a></span><span>
</span><span id="line-12"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#getHooked"><span class="hs-identifier">getHooked</span></a></span><span>
</span><span id="line-13"></span><span>     </span><span class="hs-comment">-- the hooks:</span><span>
</span><span id="line-14"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#dsForeignsHook"><span class="hs-identifier">dsForeignsHook</span></a></span><span>
</span><span id="line-15"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#tcForeignImportsHook"><span class="hs-identifier">tcForeignImportsHook</span></a></span><span>
</span><span id="line-16"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#tcForeignExportsHook"><span class="hs-identifier">tcForeignExportsHook</span></a></span><span>
</span><span id="line-17"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#hscFrontendHook"><span class="hs-identifier">hscFrontendHook</span></a></span><span>
</span><span id="line-18"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#hscCompileCoreExprHook"><span class="hs-identifier">hscCompileCoreExprHook</span></a></span><span>
</span><span id="line-19"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#ghcPrimIfaceHook"><span class="hs-identifier">ghcPrimIfaceHook</span></a></span><span>
</span><span id="line-20"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#runPhaseHook"><span class="hs-identifier">runPhaseHook</span></a></span><span>
</span><span id="line-21"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#runMetaHook"><span class="hs-identifier">runMetaHook</span></a></span><span>
</span><span id="line-22"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#linkHook"><span class="hs-identifier">linkHook</span></a></span><span>
</span><span id="line-23"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#runRnSpliceHook"><span class="hs-identifier">runRnSpliceHook</span></a></span><span>
</span><span id="line-24"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#getValueSafelyHook"><span class="hs-identifier">getValueSafelyHook</span></a></span><span>
</span><span id="line-25"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#createIservProcessHook"><span class="hs-identifier">createIservProcessHook</span></a></span><span>
</span><span id="line-26"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#stgToCmmHook"><span class="hs-identifier">stgToCmmHook</span></a></span><span>
</span><span id="line-27"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#cmmToRawCmmHook"><span class="hs-identifier">cmmToRawCmmHook</span></a></span><span>
</span><span id="line-28"></span><span>   </span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Pipeline.Monad.html"><span class="hs-identifier">GHC.Driver.Pipeline.Monad</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html"><span class="hs-identifier">GHC.Hs.Decls</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html"><span class="hs-identifier">GHC.Hs.Binds</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html"><span class="hs-identifier">GHC.Hs.Expr</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.OrdList.html"><span class="hs-identifier">GHC.Data.OrdList</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html"><span class="hs-identifier">GHC.Tc.Types</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html"><span class="hs-identifier">GHC.Types.Name.Reader</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghci/src/GHCi.RemoteTypes.html#"><span class="hs-identifier">GHCi.RemoteTypes</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../process/src/System.Process.html#"><span class="hs-identifier">System.Process</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html"><span class="hs-identifier">GHC.Types.CostCentre</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html"><span class="hs-identifier">GHC.Stg.Syntax</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html"><span class="hs-identifier">GHC.Data.Stream</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html"><span class="hs-identifier">GHC.Hs.Extension</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html"><span class="hs-identifier">GHC.StgToCmm.Types</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#ModuleLFInfos"><span class="hs-identifier">ModuleLFInfos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Hooks}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | Hooks can be used by GHC API clients to replace parts of</span><span>
</span><span id="line-71"></span><span class="hs-comment">--   the compiler pipeline. If a hook is not installed, GHC</span><span>
</span><span id="line-72"></span><span class="hs-comment">--   uses the default built-in behaviour</span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span class="annot"><a href="GHC.Driver.Hooks.html#emptyHooks"><span class="hs-identifier hs-type">emptyHooks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier hs-type">Hooks</span></a></span><span>
</span><span id="line-75"></span><span id="emptyHooks"><span class="annot"><span class="annottext">emptyHooks :: Hooks
</span><a href="GHC.Driver.Hooks.html#emptyHooks"><span class="hs-identifier hs-var hs-var">emptyHooks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Hooks :: Maybe
  ([LForeignDecl GhcTc]
   -&gt; DsM (ForeignStubs, OrdList (Id, CoreExpr)))
-&gt; Maybe
     ([LForeignDecl GhcRn]
      -&gt; TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt))
-&gt; Maybe
     ([LForeignDecl GhcRn]
      -&gt; TcM (LHsBinds GhcTc, [LForeignDecl GhcTc], Bag GlobalRdrElt))
-&gt; Maybe (ModSummary -&gt; Hsc FrontendResult)
-&gt; Maybe (HscEnv -&gt; SrcSpan -&gt; CoreExpr -&gt; IO ForeignHValue)
-&gt; Maybe ModIface
-&gt; Maybe
     (PhasePlus
      -&gt; FilePath -&gt; DynFlags -&gt; CompPipeline (PhasePlus, FilePath))
-&gt; Maybe (MetaHook TcM)
-&gt; Maybe
     (GhcLink -&gt; DynFlags -&gt; Bool -&gt; HomePackageTable -&gt; IO SuccessFlag)
-&gt; Maybe (HsSplice GhcRn -&gt; RnM (HsSplice GhcRn))
-&gt; Maybe (HscEnv -&gt; Name -&gt; Type -&gt; IO (Maybe HValue))
-&gt; Maybe (CreateProcess -&gt; IO ProcessHandle)
-&gt; Maybe
     (DynFlags
      -&gt; Module
      -&gt; [TyCon]
      -&gt; CollectedCCs
      -&gt; [CgStgTopBinding]
      -&gt; HpcInfo
      -&gt; Stream IO CmmGroup ModuleLFInfos)
-&gt; (forall a.
    Maybe
      (DynFlags
       -&gt; Maybe Module
       -&gt; Stream IO CmmGroupSRTs a
       -&gt; IO (Stream IO RawCmmGroup a)))
-&gt; Hooks
</span><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier hs-type">Hooks</span></a></span><span>
</span><span id="line-76"></span><span>  </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dsForeignsHook :: Maybe
  ([LForeignDecl GhcTc]
   -&gt; DsM (ForeignStubs, OrdList (Id, CoreExpr)))
</span><a href="GHC.Driver.Hooks.html#dsForeignsHook"><span class="hs-identifier hs-var">dsForeignsHook</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe
  ([LForeignDecl GhcTc]
   -&gt; DsM (ForeignStubs, OrdList (Id, CoreExpr)))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-77"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcForeignImportsHook :: Maybe
  ([LForeignDecl GhcRn]
   -&gt; TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt))
</span><a href="GHC.Driver.Hooks.html#tcForeignImportsHook"><span class="hs-identifier hs-var">tcForeignImportsHook</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe
  ([LForeignDecl GhcRn]
   -&gt; TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-78"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcForeignExportsHook :: Maybe
  ([LForeignDecl GhcRn]
   -&gt; TcM (LHsBinds GhcTc, [LForeignDecl GhcTc], Bag GlobalRdrElt))
</span><a href="GHC.Driver.Hooks.html#tcForeignExportsHook"><span class="hs-identifier hs-var">tcForeignExportsHook</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe
  ([LForeignDecl GhcRn]
   -&gt; TcM (LHsBinds GhcTc, [LForeignDecl GhcTc], Bag GlobalRdrElt))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-79"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hscFrontendHook :: Maybe (ModSummary -&gt; Hsc FrontendResult)
</span><a href="GHC.Driver.Hooks.html#hscFrontendHook"><span class="hs-identifier hs-var">hscFrontendHook</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (ModSummary -&gt; Hsc FrontendResult)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hscCompileCoreExprHook :: Maybe (HscEnv -&gt; SrcSpan -&gt; CoreExpr -&gt; IO ForeignHValue)
</span><a href="GHC.Driver.Hooks.html#hscCompileCoreExprHook"><span class="hs-identifier hs-var">hscCompileCoreExprHook</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HscEnv -&gt; SrcSpan -&gt; CoreExpr -&gt; IO ForeignHValue)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ghcPrimIfaceHook :: Maybe ModIface
</span><a href="GHC.Driver.Hooks.html#ghcPrimIfaceHook"><span class="hs-identifier hs-var">ghcPrimIfaceHook</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">runPhaseHook :: Maybe
  (PhasePlus
   -&gt; FilePath -&gt; DynFlags -&gt; CompPipeline (PhasePlus, FilePath))
</span><a href="GHC.Driver.Hooks.html#runPhaseHook"><span class="hs-identifier hs-var">runPhaseHook</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe
  (PhasePlus
   -&gt; FilePath -&gt; DynFlags -&gt; CompPipeline (PhasePlus, FilePath))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-83"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">runMetaHook :: Maybe (MetaHook TcM)
</span><a href="GHC.Driver.Hooks.html#runMetaHook"><span class="hs-identifier hs-var">runMetaHook</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (MetaHook TcM)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-84"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">linkHook :: Maybe
  (GhcLink -&gt; DynFlags -&gt; Bool -&gt; HomePackageTable -&gt; IO SuccessFlag)
</span><a href="GHC.Driver.Hooks.html#linkHook"><span class="hs-identifier hs-var">linkHook</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe
  (GhcLink -&gt; DynFlags -&gt; Bool -&gt; HomePackageTable -&gt; IO SuccessFlag)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-85"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">runRnSpliceHook :: Maybe (HsSplice GhcRn -&gt; RnM (HsSplice GhcRn))
</span><a href="GHC.Driver.Hooks.html#runRnSpliceHook"><span class="hs-identifier hs-var">runRnSpliceHook</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HsSplice GhcRn -&gt; RnM (HsSplice GhcRn))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">getValueSafelyHook :: Maybe (HscEnv -&gt; Name -&gt; Type -&gt; IO (Maybe HValue))
</span><a href="GHC.Driver.Hooks.html#getValueSafelyHook"><span class="hs-identifier hs-var">getValueSafelyHook</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HscEnv -&gt; Name -&gt; Type -&gt; IO (Maybe HValue))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-87"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">createIservProcessHook :: Maybe (CreateProcess -&gt; IO ProcessHandle)
</span><a href="GHC.Driver.Hooks.html#createIservProcessHook"><span class="hs-identifier hs-var">createIservProcessHook</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (CreateProcess -&gt; IO ProcessHandle)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-88"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">stgToCmmHook :: Maybe
  (DynFlags
   -&gt; Module
   -&gt; [TyCon]
   -&gt; CollectedCCs
   -&gt; [CgStgTopBinding]
   -&gt; HpcInfo
   -&gt; Stream IO CmmGroup ModuleLFInfos)
</span><a href="GHC.Driver.Hooks.html#stgToCmmHook"><span class="hs-identifier hs-var">stgToCmmHook</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe
  (DynFlags
   -&gt; Module
   -&gt; [TyCon]
   -&gt; CollectedCCs
   -&gt; [CgStgTopBinding]
   -&gt; HpcInfo
   -&gt; Stream IO CmmGroup ModuleLFInfos)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-89"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cmmToRawCmmHook :: forall a.
Maybe
  (DynFlags
   -&gt; Maybe Module
   -&gt; Stream IO CmmGroupSRTs a
   -&gt; IO (Stream IO RawCmmGroup a))
</span><a href="GHC.Driver.Hooks.html#cmmToRawCmmHook"><span class="hs-identifier hs-var">cmmToRawCmmHook</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">forall a. Maybe a
forall a.
Maybe
  (DynFlags
   -&gt; Maybe Module
   -&gt; Stream IO CmmGroupSRTs a
   -&gt; IO (Stream IO RawCmmGroup a))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-90"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-keyword">data</span><span> </span><span id="Hooks"><span class="annot"><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier hs-var">Hooks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Hooks"><span class="annot"><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier hs-var">Hooks</span></a></span></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="dsForeignsHook"><span class="annot"><span class="annottext">Hooks
-&gt; Maybe
     ([LForeignDecl GhcTc]
      -&gt; DsM (ForeignStubs, OrdList (Id, CoreExpr)))
</span><a href="GHC.Driver.Hooks.html#dsForeignsHook"><span class="hs-identifier hs-var hs-var">dsForeignsHook</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LForeignDecl"><span class="hs-identifier hs-type">LForeignDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>                           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ForeignStubs"><span class="hs-identifier hs-type">ForeignStubs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.OrdList.html#OrdList"><span class="hs-identifier hs-type">OrdList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="tcForeignImportsHook"><span class="annot"><span class="annottext">Hooks
-&gt; Maybe
     ([LForeignDecl GhcRn]
      -&gt; TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt))
</span><a href="GHC.Driver.Hooks.html#tcForeignImportsHook"><span class="hs-identifier hs-var hs-var">tcForeignImportsHook</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LForeignDecl"><span class="hs-identifier hs-type">LForeignDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-96"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LForeignDecl"><span class="hs-identifier hs-type">LForeignDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#GlobalRdrElt"><span class="hs-identifier hs-type">GlobalRdrElt</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="tcForeignExportsHook"><span class="annot"><span class="annottext">Hooks
-&gt; Maybe
     ([LForeignDecl GhcRn]
      -&gt; TcM (LHsBinds GhcTc, [LForeignDecl GhcTc], Bag GlobalRdrElt))
</span><a href="GHC.Driver.Hooks.html#tcForeignExportsHook"><span class="hs-identifier hs-var hs-var">tcForeignExportsHook</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LForeignDecl"><span class="hs-identifier hs-type">LForeignDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-98"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#LHsBinds"><span class="hs-identifier hs-type">LHsBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LForeignDecl"><span class="hs-identifier hs-type">LForeignDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#GlobalRdrElt"><span class="hs-identifier hs-type">GlobalRdrElt</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="hscFrontendHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe (ModSummary -&gt; Hsc FrontendResult)
</span><a href="GHC.Driver.Hooks.html#hscFrontendHook"><span class="hs-identifier hs-var hs-var">hscFrontendHook</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ModSummary"><span class="hs-identifier hs-type">ModSummary</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Hsc"><span class="hs-identifier hs-type">Hsc</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#FrontendResult"><span class="hs-identifier hs-type">FrontendResult</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="hscCompileCoreExprHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe (HscEnv -&gt; SrcSpan -&gt; CoreExpr -&gt; IO ForeignHValue)
</span><a href="GHC.Driver.Hooks.html#hscCompileCoreExprHook"><span class="hs-identifier hs-var hs-var">hscCompileCoreExprHook</span></a></span></span><span> </span><span class="hs-glyph">::</span><span>
</span><span id="line-101"></span><span>               </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../ghci/src/GHCi.RemoteTypes.html#ForeignHValue"><span class="hs-identifier hs-type">ForeignHValue</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="ghcPrimIfaceHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe ModIface
</span><a href="GHC.Driver.Hooks.html#ghcPrimIfaceHook"><span class="hs-identifier hs-var hs-var">ghcPrimIfaceHook</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="runPhaseHook"><span class="annot"><span class="annottext">Hooks
-&gt; Maybe
     (PhasePlus
      -&gt; FilePath -&gt; DynFlags -&gt; CompPipeline (PhasePlus, FilePath))
</span><a href="GHC.Driver.Hooks.html#runPhaseHook"><span class="hs-identifier hs-var hs-var">runPhaseHook</span></a></span></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Pipeline.Monad.html#PhasePlus"><span class="hs-identifier hs-type">PhasePlus</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-104"></span><span>                                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Pipeline.Monad.html#CompPipeline"><span class="hs-identifier hs-type">CompPipeline</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Pipeline.Monad.html#PhasePlus"><span class="hs-identifier hs-type">PhasePlus</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="runMetaHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe (MetaHook TcM)
</span><a href="GHC.Driver.Hooks.html#runMetaHook"><span class="hs-identifier hs-var hs-var">runMetaHook</span></a></span></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#MetaHook"><span class="hs-identifier hs-type">MetaHook</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="linkHook"><span class="annot"><span class="annottext">Hooks
-&gt; Maybe
     (GhcLink -&gt; DynFlags -&gt; Bool -&gt; HomePackageTable -&gt; IO SuccessFlag)
</span><a href="GHC.Driver.Hooks.html#linkHook"><span class="hs-identifier hs-var hs-var">linkHook</span></a></span></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Session.html#GhcLink"><span class="hs-identifier hs-type">GhcLink</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-107"></span><span>                                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HomePackageTable"><span class="hs-identifier hs-type">HomePackageTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#SuccessFlag"><span class="hs-identifier hs-type">SuccessFlag</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="runRnSpliceHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe (HsSplice GhcRn -&gt; RnM (HsSplice GhcRn))
</span><a href="GHC.Driver.Hooks.html#runRnSpliceHook"><span class="hs-identifier hs-var hs-var">runRnSpliceHook</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsSplice"><span class="hs-identifier hs-type">HsSplice</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsSplice"><span class="hs-identifier hs-type">HsSplice</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="getValueSafelyHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe (HscEnv -&gt; Name -&gt; Type -&gt; IO (Maybe HValue))
</span><a href="GHC.Driver.Hooks.html#getValueSafelyHook"><span class="hs-identifier hs-var hs-var">getValueSafelyHook</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-110"></span><span>                                                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghci/src/GHCi.RemoteTypes.html#HValue"><span class="hs-identifier hs-type">HValue</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="createIservProcessHook"><span class="annot"><span class="annottext">Hooks -&gt; Maybe (CreateProcess -&gt; IO ProcessHandle)
</span><a href="GHC.Driver.Hooks.html#createIservProcessHook"><span class="hs-identifier hs-var hs-var">createIservProcessHook</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../process/src/System.Process.Common.html#CreateProcess"><span class="hs-identifier hs-type">CreateProcess</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../process/src/System.Process.Common.html#ProcessHandle"><span class="hs-identifier hs-type">ProcessHandle</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="stgToCmmHook"><span class="annot"><span class="annottext">Hooks
-&gt; Maybe
     (DynFlags
      -&gt; Module
      -&gt; [TyCon]
      -&gt; CollectedCCs
      -&gt; [CgStgTopBinding]
      -&gt; HpcInfo
      -&gt; Stream IO CmmGroup ModuleLFInfos)
</span><a href="GHC.Driver.Hooks.html#stgToCmmHook"><span class="hs-identifier hs-var hs-var">stgToCmmHook</span></a></span></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html#CollectedCCs"><span class="hs-identifier hs-type">CollectedCCs</span></a></span><span>
</span><span id="line-113"></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#CgStgTopBinding"><span class="hs-identifier hs-type">CgStgTopBinding</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HpcInfo"><span class="hs-identifier hs-type">HpcInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGroup"><span class="hs-identifier hs-type">CmmGroup</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#ModuleLFInfos"><span class="hs-identifier hs-type">ModuleLFInfos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="cmmToRawCmmHook"><span class="annot"><span class="annottext">Hooks
-&gt; forall a.
   Maybe
     (DynFlags
      -&gt; Maybe Module
      -&gt; Stream IO CmmGroupSRTs a
      -&gt; IO (Stream IO RawCmmGroup a))
</span><a href="GHC.Driver.Hooks.html#cmmToRawCmmHook"><span class="hs-identifier hs-var hs-var">cmmToRawCmmHook</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680932122"><span class="annot"><a href="#local-6989586621680932122"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGroupSRTs"><span class="hs-identifier hs-type">CmmGroupSRTs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932122"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-115"></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-type">RawCmmGroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932122"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span id="local-6989586621680932116"><span id="local-6989586621680932118"><span class="annot"><a href="GHC.Driver.Hooks.html#getHooked"><span class="hs-identifier hs-type">getHooked</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932118"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#HasDynFlags"><span class="hs-identifier hs-type">HasDynFlags</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932118"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier hs-type">Hooks</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932116"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680932116"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680932118"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932116"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-119"></span><span id="getHooked"><span class="annot"><span class="annottext">getHooked :: forall (f :: * -&gt; *) a.
(Functor f, HasDynFlags f) =&gt;
(Hooks -&gt; Maybe a) -&gt; a -&gt; f a
</span><a href="GHC.Driver.Hooks.html#getHooked"><span class="hs-identifier hs-var hs-var">getHooked</span></a></span></span><span> </span><span id="local-6989586621680932081"><span class="annot"><span class="annottext">Hooks -&gt; Maybe a
</span><a href="#local-6989586621680932081"><span class="hs-identifier hs-var">hook</span></a></span></span><span> </span><span id="local-6989586621680932080"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680932080"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DynFlags -&gt; a) -&gt; f DynFlags -&gt; f a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Hooks -&gt; Maybe a) -&gt; a -&gt; DynFlags -&gt; a
forall a. (Hooks -&gt; Maybe a) -&gt; a -&gt; DynFlags -&gt; a
</span><a href="GHC.Driver.Hooks.html#lookupHook"><span class="hs-identifier hs-var">lookupHook</span></a></span><span> </span><span class="annot"><span class="annottext">Hooks -&gt; Maybe a
</span><a href="#local-6989586621680932081"><span class="hs-identifier hs-var">hook</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680932080"><span class="hs-identifier hs-var">def</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span id="local-6989586621680932110"><span class="annot"><a href="GHC.Driver.Hooks.html#lookupHook"><span class="hs-identifier hs-type">lookupHook</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Hooks.html#Hooks"><span class="hs-identifier hs-type">Hooks</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680932110"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680932110"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680932110"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-122"></span><span id="lookupHook"><span class="annot"><span class="annottext">lookupHook :: forall a. (Hooks -&gt; Maybe a) -&gt; a -&gt; DynFlags -&gt; a
</span><a href="GHC.Driver.Hooks.html#lookupHook"><span class="hs-identifier hs-var hs-var">lookupHook</span></a></span></span><span> </span><span id="local-6989586621680932078"><span class="annot"><span class="annottext">Hooks -&gt; Maybe a
</span><a href="#local-6989586621680932078"><span class="hs-identifier hs-var">hook</span></a></span></span><span> </span><span id="local-6989586621680932077"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680932077"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a -&gt; a
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680932077"><span class="hs-identifier hs-var">def</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; a) -&gt; (DynFlags -&gt; Maybe a) -&gt; DynFlags -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Hooks -&gt; Maybe a
</span><a href="#local-6989586621680932078"><span class="hs-identifier hs-var">hook</span></a></span><span> </span><span class="annot"><span class="annottext">(Hooks -&gt; Maybe a) -&gt; (DynFlags -&gt; Hooks) -&gt; DynFlags -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Hooks
</span><a href="GHC.Driver.Session.html#hooks"><span class="hs-identifier hs-var hs-var">hooks</span></a></span><span>
</span><span id="line-123"></span></pre></body></html>